<?php
ob_start();
session_start();

include("conf/config.php");
include("conf/database.php");
include("conf/tools.php");
$memberId=$_SESSION["member_id"];
$curTime=getIndianDateTime();

foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }

$arr_data["rec_status"]=1;
$query_id=$_GET["query_id"];
$arr_data["rec_created"]=$curTime;
$arr_data["member_id"]=$memberId;

if($query_id>0){
	update_qry("bkitc_queries",$arr_data,"query_id=".$query_id);
}
else{
	$query_id=insert_qry("bkitc_queries",$arr_data);
	$mem_info=getMemberInfo($memberId);
	submit_query($mem_info);
}


header("location:queries.php");


?>

